#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<assert.h>


char* my_strncpy(char* dest,const char* src, int count)
{
	assert(dest && src);
	char* start = dest;
	while (count--)
	{
		*dest++ = *src++;
	}
	return start;
}

int main()
{
	char arr1[20] = { 0 };
	char* arr2 = "abcdef";
	printf("%s\n", my_strncpy(arr1, arr2, 4));
	return 0;
}